package simple.enums;

public enum GpsQuality {
	INVALID(0),
	GPS(1),
	DGPS(2),
	PPS(3),
	RTK(4),
	FRTK(5),
	ESTIMATED(6),
	MANUAL(7),
	SIMULATION(8),
	UNKNOWN(-1);
	
	private int quality;
	
	GpsQuality(int quality){
		this.quality = quality;
	}
	
	public int getQuality(){
		return this.quality;
	}
	
	public GpsQuality parseQuality(int quality){
		if(quality == 0){
			return GpsQuality.INVALID;
		}
		else if(quality == 1){
			return GpsQuality.GPS;
		}
		else if(quality == 2){
			return GpsQuality.DGPS;
		}
		else if(quality == 3){
			return GpsQuality.PPS;
		}
		else if(quality == 4){
			return GpsQuality.RTK;
		}
		else if(quality == 5){
			return GpsQuality.FRTK;
		}
		else if(quality == 6){
			return GpsQuality.ESTIMATED;
		}
		else if(quality == 7){
			return GpsQuality.MANUAL;
		}
		else if(quality == 8){
			return GpsQuality.SIMULATION;
		}
		else {
			return GpsQuality.UNKNOWN;
		}
	}
}

/*
 * Fix quality: 0 = invalid
                1 = GPS fix (SPS)
                2 = DGPS fix
                3 = PPS fix
			    4 = Real Time Kinematic
			    5 = Float RTK
                6 = estimated (dead reckoning) (2.3 feature)
			    7 = Manual input mode
			    8 = Simulation mode

 */
